{extend name="base" /}
{block name="body"}
<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card">
                <form class="layui-form form-container" action="{:url('admin/system/updateSiteConfig')}" method="post">
                    <div class="layui-tab layui-tab-brief">
                        <ul class="layui-tab-title">
                            <li class="layui-this">基本设置</li>
                            <li>微信设置</li>
                            <li>短信设置</li>
                            <li>支付设置</li>
                            <li>滑块设置</li>
                        </ul>
                        <div class="layui-tab-content">
                            <div class="layui-tab-item layui-show">
                                <div class="layui-form" wid100>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">网站名称</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="site_config[site_title]" required  lay-verify="required" value="{$site_config.site_title|default=''}" class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">网站域名</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="site_config[site_domain]" required  lay-verify="required" value="{$site_config.site_domain|default=''}" class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">转换接口</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="site_config[interface_url]" required  lay-verify="required" value="{$site_config.interface_url|default=''}" class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">存储域名</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="site_config[storage_url]" required  lay-verify="required" value="{$site_config.storage_url|default=''}" class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">客服QQ</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="site_config[qq]" required  lay-verify="required" value="{$site_config.qq|default=''}" class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">email</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="site_config[email]" required  lay-verify="required" value="{$site_config.email|default=''}" class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">微信二维码</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="site_config[weixin_qrcode]" value="{$site_config.weixin_qrcode|default=''}" style="width: 80%" placeholder="（选填）请上传封面" class="layui-input layui-input-inline" id="qrcode-url">
                                                <button type="button" class="layui-btn" data-upload-url="{:url("/upload/upload")}" id="qrcode"><i class="layui-icon">&#xe67c;</i>选择文件</button>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">备案号</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="site_config[beian]" required  lay-verify="required" value="{$site_config.beian|default=''}" class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">通讯秘钥</label>
                                            <div class="layui-input-block">
                                                <input type="text" name="site_config[site_key]" required  lay-verify="required" value="{$site_config.site_key|default=''}" class="layui-input">
                                            </div>
                                        </div>
                                        <div class="layui-form-item layui-form-text">
                                            <label class="layui-form-label">统计代码</label>
                                            <div class="layui-input-block">
                                                <textarea name="site_config[site_tongji]" placeholder="请输入统计代码" class="layui-textarea">{$site_config.site_tongji|default=''}</textarea>
                                            </div>
                                        </div>
                                        <div class="layui-form-item layui-form-text">
                                            <label class="layui-form-label">版权信息</label>
                                            <div class="layui-input-block">
                                                <textarea name="site_config[site_copyright]" placeholder="请输入版权信息" class="layui-textarea">{$site_config.site_copyright|default=''}</textarea>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-input-block">
                                                <button class="layui-btn" lay-submit lay-filter="*">确认保存</button>
                                            </div>
                                        </div>
                                    </div>
                            </div>
                            <div class="layui-tab-item">
                                <div class="layui-form" wid100>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">微信登录</label>
                                        <div class="layui-input-block">
                                            <input type="radio" name="site_config[weixin_login]" value="on" title="开" {eq name="$site_config.weixin_login" value="on"}checked{/eq}>
                                            <input type="radio" name="site_config[weixin_login]" value="off" title="关" {eq name="$site_config.weixin_login" value="off"}checked{/eq} >
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">APPID</label>
                                        <div class="layui-input-block">
                                            <input type="text" name="site_config[weixin_appid]"  value="{$site_config.weixin_appid|default=''}" class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">SECRET</label>
                                        <div class="layui-input-block">
                                            <input type="text" name="site_config[weixin_secret]"  value="{$site_config.weixin_secret|default=''}" class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">AESKEY</label>
                                        <div class="layui-input-block">
                                            <input type="text" name="site_config[weixin_aes_key]" value="{$site_config.weixin_aes_key|default=''}" class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">TOKEN</label>
                                        <div class="layui-input-block">
                                            <input type="text" name="site_config[weixin_token]" value="{$site_config.weixin_token|default=''}" class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <div class="layui-input-block">
                                            <button class="layui-btn" lay-submit lay-filter="*">确认保存</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-tab-item">
                                <div class="layui-form" wid100>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">短信接口</label>
                                        <div class="layui-input-block">
                                            <input type="radio" name="site_config[sms_api_type]" value="aliyun" title="阿里云" {eq name="$site_config.sms_api_type|default=''" value="aliyun"}checked{/eq}>
                                            <input type="radio" name="site_config[sms_api_type]" value="tencent" title="腾讯云" {eq name="$site_config.sms_api_type|default=''" value="tencent"}checked{/eq} >
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">APPID</label>
                                        <div class="layui-input-block">
                                            <input type="text" name="site_config[sms_api_appid]" placeholder="腾讯云专用,选择阿里云则无需填写."  value="{$site_config.sms_api_appid|default=''}" class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">KEYID</label>
                                        <div class="layui-input-block">
                                            <input type="text" name="site_config[sms_api_keyid]" required  lay-verify="required" value="{$site_config.sms_api_keyid|default=''}" class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">SECRET</label>
                                        <div class="layui-input-block">
                                            <input type="text" name="site_config[sms_api_secret]" required  lay-verify="required" value="{$site_config.sms_api_secret|default=''}" class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">签名</label>
                                        <div class="layui-input-block">
                                            <input type="text" name="site_config[sms_api_sign]" required  lay-verify="required" value="{$site_config.sms_api_sign|default=''}" class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">模板ID</label>
                                        <div class="layui-input-block">
                                            <input type="text" name="site_config[sms_api_template_id]" required  lay-verify="required" value="{$site_config.sms_api_template_id|default=''}" class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <div class="layui-input-block">
                                            <button class="layui-btn" lay-submit lay-filter="*">确认保存</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="layui-tab-item">
                                <div class="layui-form" wid100>
                                    <fieldset class="layui-elem-field">
                                        <legend>全站免费</legend>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">启用</label>
                                            <div class="layui-input-block">
                                                <input type="radio" name="site_config[pay_type_free]" value="1" title="启用" {eq name="$site_config.pay_type_free|default=''" value="1"}checked{/eq}>
                                                <input type="radio" name="site_config[pay_type_free]" value="0" title="关闭" {eq name="$site_config.pay_type_free|default=''" value="0"}checked{/eq} >
                                            </div>
                                        </div>
                                    </fieldset>
                                    <fieldset class="layui-elem-field">
                                        <legend>支付宝支付</legend>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">启用</label>
                                            <div class="layui-input-block">
                                                <input type="radio" name="site_config[pay_type_alipay]" value="1" title="启用" {eq name="$site_config.pay_type_alipay|default=''" value="1"}checked{/eq}>
                                                <input type="radio" name="site_config[pay_type_alipay]" value="0" title="关闭" {eq name="$site_config.pay_type_alipay|default=''" value="0"}checked{/eq} >
                                            </div>
                                        </div>
                                    </fieldset>
                                    <fieldset class="layui-elem-field">
                                        <legend>微信支付</legend>
                                        <div class="layui-form-item">
                                            <label class="layui-form-label">启用</label>
                                            <div class="layui-input-block">
                                                <input type="radio" name="site_config[pay_type_weixin]" value="1" title="启用" {eq name="$site_config.pay_type_weixin|default=''" value="1"}checked{/eq}>
                                                <input type="radio" name="site_config[pay_type_weixin]" value="0" title="关闭" {eq name="$site_config.pay_type_weixin|default=''" value="0"}checked{/eq} >
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-input-block">
                                                <button class="layui-btn" lay-submit lay-filter="*">确认保存</button>
                                            </div>
                                        </div>
                                    </fieldset>
                                </div>
                            </div>
                            <div class="layui-tab-item">
                                <div class="layui-form" wid100>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">SECRETID</label>
                                        <div class="layui-input-block">
                                            <input type="text" name="site_config[tencent_keyid]" required  lay-verify="required" value="{$site_config.tencent_keyid|default=''}" class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">SECRETKEY</label>
                                        <div class="layui-input-block">
                                            <input type="text" name="site_config[tencent_secretkey]" required  lay-verify="required" value="{$site_config.tencent_secretkey|default=''}" class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">CaptchaAppId</label>
                                        <div class="layui-input-block">
                                            <input type="text" name="site_config[tencent_captcha_appid]" required  lay-verify="required" value="{$site_config.tencent_captcha_appid|default=''}" class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <label class="layui-form-label">AppSecretKey</label>
                                        <div class="layui-input-block">
                                            <input type="text" name="site_config[tencent_app_secretkey]" required  lay-verify="required" value="{$site_config.tencent_app_secretkey|default=''}" class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-form-item">
                                        <div class="layui-input-block">
                                            <button class="layui-btn" lay-submit lay-filter="*">确认保存</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{/block}